//
//  TravelCell.m
//  TravelNotes
//
//  Created by qianfeng on 15-7-7.
//  Copyright (c) 2015年 ZWB. All rights reserved.
//

#import "TravelCell.h"
#import "UIImageView+WebCache.h"

@implementation TravelCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)showDataWithModel:(TravelModel *)model {
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:model.front_cover_photo_url] placeholderImage:[UIImage imageNamed:@"EmptyViewBackground"]];
    self.nameLabel.text = model.name;
    self.startDataLabel.text = [NSString stringWithFormat:@"%@ /", model.start_date];
    self.daysLabel.text = [NSString stringWithFormat:@"%@天,", model.days];
    self.photosCountLabel.text = [NSString stringWithFormat:@"%@图", model.photos_count];
    [self.arImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:[UIImage imageNamed:@"TripUserAvatarPlaceholder"]];
    if (1 == model.featured) {
        [self.featureImageView setHidden:NO];
    } else {
        [self.featureImageView setHidden:YES];
    }
}

@end
